package com.whfc.ms.api.sys.service.impl;

import com.whfc.common.result.PageData;
import com.whfc.fuum.dto.SysDictDTO;
import com.whfc.fuum.param.SysDictDataAddParam;
import com.whfc.fuum.param.SysDictDataEditParam;
import com.whfc.fuum.param.SysDictTypeAddParam;
import com.whfc.fuum.param.SysDictTypeEditParam;
import com.whfc.fuum.service.SysDictService;
import com.whfc.ms.api.sys.service.MsSysDictService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * @author qzexing
 * @version 1.0
 * @date 2020-12-11 10:25
 */
@Service
public class MsSysDictServiceImpl implements MsSysDictService {

    @DubboReference(interfaceClass = SysDictService.class, version = "1.0.0")
    private SysDictService sysDictService;

    @Override
    public PageData<SysDictDTO> typeList(Integer pageNum, Integer pageSize) {
        return sysDictService.typeList(pageNum, pageSize);
    }

    @Override
    public void addType(SysDictTypeAddParam request) {
        sysDictService.addType(request);
    }

    @Override
    public void editType(SysDictTypeEditParam request) {
        sysDictService.editType(request);
    }

    @Override
    public void delType(Integer id) {
        sysDictService.delType(id);
    }

    @Override
    public PageData<SysDictDTO> listDictData(Integer sysDictTypeId, Integer pageNum, Integer pageSize) {
        return sysDictService.listDictData(sysDictTypeId, pageNum, pageSize);
    }

    @Override
    public void addDictData(SysDictDataAddParam request) {
        sysDictService.addDictData(request);
    }

    @Override
    public void editDictData(SysDictDataEditParam request) {
        sysDictService.editDictData(request);
    }

    @Override
    public void delDictData(Integer id) {
        sysDictService.delDictData(id);
    }

    @Override
    public SysDictDTO getDictDataByTypeCode(String code) {
        return sysDictService.getDictDataByTypeCode(code);
    }
}
